﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;
using System.Runtime.Serialization.Formatters.Binary;

namespace MegaSetting
{
    [Serializable]
    class Database
    {
        internal BindingList<District> districts;
        internal Dictionary<int, BindingList<Point>> points;
        internal BindingList<Server> servers;

        public Database() 
        {
            districts = new BindingList<District>();
            points = new Dictionary<int, BindingList<Point>>();
            servers = new BindingList<Server>();

        }


    }

    [Serializable]
    class District
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string GetooUrl { get; set; }
    }
    [Serializable]
    class Point
    {
        public string PointCode { get; set; }
        //public int DistrictId { get; set; } //网点按不同列表区分 取消district外键
        public string PointName { get; set; }
        public string SubMask { get; set; }
        public string GateWay { get; set; }
        public int AppServerId { get; set; }
        public int UpdateServerId { get; set; }
    }
    [Serializable]
    class Server
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public int ServerType { get; set; }//1应用服务器 2更新服务器 政务网+0 有线通+3
        public string IP { get; set; }
        public string Port { get; set; }

    }

    [Serializable]
    class PointSetting 
    {
        public string PointCode { get; set; }
        public string LocalIp { get; set; }
        public string SubMask { get; set; }
        public string GateWay { get; set; }
        public string DatabaseIP { get; set; }
        public string AppServerIP { get; set; }
        public string UpdateServerIP { get; set; }
        public string UpdateServerPort { get; set; }
        public bool IsDatabase { get; set; }
        public bool IsManager { get; set; }
        public string GetooServerIP { get; set; }
    }
}
